#include <KApplication>
#include <KAboutData>
#include <KCmdLineArgs>
#include <KLocale>
#include <KXmlGuiWindow>
#include <KTextEdit>
#include <QHBoxLayout>
#include <QPushButton>

#define MAIN_VERSION_STRING "0.1"

class MainWindow : public KXmlGuiWindow {
	public:
		MainWindow(QWidget *parent=0);
	
	private:
		QPushButton *playBtn;
		QPushButton *stopBtn;
		QHBoxLayout *layout;
};

int main (int argc, char *argv[]) {
	KAboutData aboutData(
		// The program name used internally.
		"microPlayer",
		// The message catalog name
		// If null, program name is used instead.
		0,
		// A displayable program name string.
		ki18n("µPlayer"),
		// The program version string.
		MAIN_VERSION_STRING,
		// Short description of what the app does.
		ki18n("Simple music player"),
		// The license this code is released under
		KAboutData::License_GPL,
		// Copyright Statement
		ki18n("(c) 2011"),
		// Optional text shown in the About box.
		// Can contain any information desired.
		ki18n("Using FFmpeg and KDE/Qt libraries.\n \n FFmpeg, KDE, and Qt are trademarks of their respective owners."),
		// The program webpage string.
		"http://code.google.com/p/microplayer",
		// The bug report email address
		"microplayer@googlegroups.com");
	
	//Add Palle Ravn as developer to the aboutData
	aboutData.addAuthor(
		ki18n("Palle Ravn"),
		ki18n("Developer"),
		"ravnzon@gmail.com");
	
	//Add Henrik Juul as developer to the aboutData
	aboutData.addAuthor(
		ki18n("Henrik Juul Pedersen"),
		ki18n("Developer"),
		"henrikjuul@gmail.com");
	
	KCmdLineArgs::init( argc, argv, &aboutData );
	
	KApplication app; //Global KApplication instance
	
	KMainWindow *kmw = new MainWindow();
	kmw->show();
	
	return app.exec();
}

MainWindow::MainWindow(QWidget* parent): KXmlGuiWindow(parent) {
	
	QWidget *test = new QWidget;
	playBtn = new QPushButton("Play");
	stopBtn = new QPushButton("Stop");
	
	layout = new QHBoxLayout();
	layout->addWidget(playBtn);
	layout->addWidget(stopBtn);
	
	test->setLayout(layout);
	test->show();
	
	setCentralWidget(test);
	setupGUI();
}
